Functions


Functions Summary
mixed

cot_structure_add(string extension, array data, bool is_module)

Adds a new category

bool

cot_structure_delete(string extension, string code, bool is_module)

Removes a category

mixed

cot_structure_update(string extension, int id, array old_data, array new_data, bool is_module)

Updates an existing category in the database

Function Detail

system\structure.php at line 27

cot_structure_add

public mixed cot_structure_add(string extension, array data, bool is_module)
Adds a new category
Global:
Cache $cache
CotDB $db
string $db_structure
CotDB $db
Cache $cache
Parameters:
extension - Extension code
data - Structure entry data as array('structure_key' => 'value')
is_module - TRUE for modules, FALSE for plugins
Returns:
TRUE on success, cot_error() arguments as array on specific error, FALSE on generic error

system\structure.php at line 77

cot_structure_delete

public bool cot_structure_delete(string extension, string code, bool is_module)
Removes a category
Global:
Cache $cache
CotDB $db
string $db_structure
array $structure
CotDB $db
Cache $cache
Parameters:
extension - Extension code
code - Category code
is_module - TRUE for modules, FALSE for plugins
Returns:

system\structure.php at line 119

cot_structure_update

public mixed cot_structure_update(string extension, int id, array old_data, array new_data, bool is_module)
Updates an existing category in the database
Global:
Cache $cache
CotDB $db
string $db_auth
string $db_structure
CotDB $db
Cache $cache
Parameters:
extension - Extension code
id - Category structure_id
old_data - Data row already present in the database
new_data - Submitted category data
is_module - TRUE for modules, FALSE for plugins
Returns:
TRUE on success, cot_error() arguments as array on specific error, FALSE on generic error